package com.proxy.jdk;

import java.lang.reflect.Proxy;

/**
 * 描述:
 *
 * @author luzhongfu
 * Created by lucky on 2022-04-25 10:15 PM
 */
public class UserTest {

    public static void main(String[] args) {
        UserService userService = (UserService) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
                new Class[]{UserService.class},new DemoProxy(new UserServiceImpl()));
        userService.say();
    }
}
